home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / winprogs / childenc / oecdemo / shared.dir / 00443_scroll up.ls < prev    next >
Encoding:
Text File  |  1996-07-24  |  1.5 KB  |  46 lines

  1. on mouseDown
  2.   global CR, menuText, linePtr, offsetPtr, tempText, displayLines, scrUpCast, castData
  3.   if menuText <> EMPTY then
  4.     set totLines to the number of lines in menuText
  5.     set the castNum of sprite clickOn() to scrUpCast + 1
  6.     updateStage()
  7.     set tempText to field 441
  8.     repeat while the mouseDown
  9.       if offsetPtr > 0 then
  10.         set tempText to line offsetPtr of menuText & CR & tempText
  11.         delete line the number of lines in tempText of tempText
  12.         put tempText into field 441
  13.         set offsetPtr to offsetPtr - 1
  14.         if the locH of sprite 48 < 1000 then
  15.           set theLocV to the locV of sprite 48
  16.           set the visible of sprite 48 to 0
  17.           set theLocV to theLocV + the textHeight of field 441
  18.           set the locV of sprite 48 to theLocV
  19.           if (theLocV < the bottom of sprite 39) and (theLocV >= the top of sprite 39) then
  20.             if rollOver(40) then
  21.               set the visible of sprite 48 to 1
  22.             end if
  23.           end if
  24.         end if
  25.         setScroll(47, offsetPtr, totLines, 441)
  26.         updateStage()
  27.       end if
  28.     end repeat
  29.     set the castNum of sprite clickOn() to scrUpCast
  30.     updateStage()
  31.   else
  32.     set me to the clickOn
  33.     set x to the castNum of sprite me
  34.     set the castNum of sprite me to x + 1
  35.     repeat while the mouseDown
  36.       updateStage()
  37.     end repeat
  38.     set the castNum of sprite me to x
  39.     updateStage()
  40.     if rollOver(me) then
  41.       put "Search" into item 1 of castData
  42.       setUpSprites("37-42;48", 0)
  43.     end if
  44.   end if
  45. end
  46.